package models;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;

import play.db.ebean.Model;
import play.db.ebean.Model.Finder;
@Entity
public class edu_courserates extends Model {
	@Id
	public int relation_id;
	public int course_id;
	public float course_rate;
	
	public static Finder<Long,edu_courserates> find = new Finder<Long,edu_courserates>(Long.class, edu_courserates.class);
	
	public static List<edu_courserates> findById(int courseId)
	{
		return edu_courserates.find.where().eq("course_id",courseId).findList();
	}
}
